using System.Windows;
using System.Windows.Media;

namespace OpenLS.Spreadsheet
{
    static class SpreadsheetFont
    {
        internal static Typeface CreateTypeface (FontFamily ff, FontStyle actualFontStyle, FontWeight actualFontWeight)
        {
            if (ff != null && ff.Source == "Arial Narrow")
                return new Typeface(new FontFamily("Arial"), actualFontStyle,
                                    actualFontWeight, FontStretches.Condensed);

            return new Typeface(ff, actualFontStyle,
                                actualFontWeight, FontStretches.Normal);

        }
    }
}